using System;
using System.Collections.Generic;
using ns26;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("Object")]
	public class UnityObject : MonoClass
	{
		public string name => method_13("get_name");

		public UnityObject(IntPtr address, string className)
			: base(address, className)
		{
		}

		public UnityObject(IntPtr address)
			: base(address, "Object")
		{
		}

		public override int GetHashCode()
		{
			return method_11<int>("GetHashCode", Array.Empty<object>());
		}

		public int GetInstanceID()
		{
			return method_11<int>("GetInstanceID", Array.Empty<object>());
		}

		public static UnityObject FindObjectOfType<T>()
		{
			IntPtr intPtr = MonoClass.ReflectionTypeGetType(typeof(T).Name);
			if (intPtr != IntPtr.Zero)
			{
				return MonoClass.smethod_16<UnityObject>(TritonHs.UnityEngineAssemblyPath, "UnityEngine", "Object", "FindObjectOfType", new Class276.Enum20[1] { Class276.Enum20.Class }, new object[1] { intPtr });
			}
			return null;
		}

		public static UnityObject FindObjectsOfType(string typeName)
		{
			IntPtr intPtr = MonoClass.ReflectionTypeGetType(typeName);
			if (intPtr != IntPtr.Zero)
			{
				return MonoClass.smethod_16<UnityObject>(TritonHs.UnityEngineAssemblyPath, "UnityEngine", "Object", "FindObjectsOfType", new Class276.Enum20[1] { Class276.Enum20.Class }, new object[1] { intPtr });
			}
			return null;
		}

		public static List<UnityObject> FindObjectsOfType<T>()
		{
			IntPtr intPtr = MonoClass.ReflectionTypeGetType(typeof(T).Name);
			if (intPtr != IntPtr.Zero)
			{
				return MonoClass.smethod_16<Class251<UnityObject>>(TritonHs.UnityEngineAssemblyPath, "UnityEngine", "Object", "FindObjectsOfType", new Class276.Enum20[1] { Class276.Enum20.Class }, new object[1] { intPtr }).method_25();
			}
			return null;
		}

		public static IntPtr GetType(string name, string assembly)
		{
			return MonoClass.smethod_16<TypeWrapper>(TritonHs.UnityEngineAssemblyPath, "UnityEngine", "Types", "GetType", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.String
			}, new object[2] { name, assembly })?.Address ?? IntPtr.Zero;
		}
	}
}
